package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.time.LocalDateTime;

/**
 * 粮食转仓记录对象 sys_food_transfer
 *
 * @author mars
 * @date 2024-04-02
 */

@Data
@ApiModel(value = "粮食转仓记录对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_food_transfer")
public class SysFoodTransfer {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 粮食
     */
    @Excel(name = "粮食")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "粮食")
    private Long foodId;

    @TableField(exist = false)
    @ApiModelProperty(value = "粮食名称")
    private String foodName;
    /**
     * 转移前仓库
     */
    @Excel(name = "转移前仓库")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "转移前仓库")
    private Long oldHouseId;

    @TableField(exist = false)
    @ApiModelProperty(value = "转移前仓库名称")
    private String oldHouseName;
    /**
     * 转移后仓库
     */
    @Excel(name = "转移后仓库")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "转移后仓库")
    private Long newHouseId;

    @TableField(exist = false)
    @ApiModelProperty(value = "转移后仓库名称")
    private String newHouseName;
    /**
     * 数量
     */
    @Excel(name = "数量")
    @ApiModelProperty(value = "数量")
    private int amount;
    /**
     * 流水号
     */
    @Excel(name = "流水号")
    @ApiModelProperty(value = "流水号")
    private String serialNo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;

    @TableField(exist = false)
    @ApiModelProperty(value = "创建人名称")
    private String createByName;
}
